/// CreateTime 2020/4/22 15:14
/// CreateUser chen 
/// ProjectName flutter_elf
import 'package:flutter_elf/config/component_index.dart';
import 'package:flutter_elf/model/gank_io_girl_response.dart';

class GankIOService {
  String girlList = 'https://gank.io/api/v2/data/category/Girl/type/Girl/page/1/count/100';

  static Future<GankIOGirlResponse> getCategory(int page,{State state}){
    return _fetch<GankIOGirlResponse>("https://gank.io/api/v2/data/category/Girl/type/Girl/page/$page/count/20", null,method: Method.GET,state: state);
  }

  static Future<T> _fetch<T>(String url,String request,{State state,String method}){
    return HttpManagers().netFetch<T>(url,request,fromType: 'HomeService',state: state,method: method);
  }
}